package com.hxexp.weixin.test.api;

import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.MethodSorters;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;

import com.hxexp.weixin.common.exception.APIException;
import com.hxexp.weixin.hpe.api.trafficline.TrafficLineAPI;
import com.hxexp.weixin.hpe.api.trafficline.model.TrafficLineParamBean;
import com.hxexp.weixin.hpe.api.trafficline.model.TrafficLineResultBean;
import com.hxexp.weixin.test.runner.JUnit4WithSpringLogClassRunner;

/**
 * 查询车次接口实现类测试
 *
 * @author wang.bin
 *
 */
@RunWith(JUnit4WithSpringLogClassRunner.class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@ContextConfiguration(locations = { "classpath:conf/spring/spring-biz.xml", "classpath:conf/spring/spring-ehcache.xml" })
public class TrafficLineAPIImplTester {

    @Autowired
    private TrafficLineAPI trafficLineAPI;

    @Test
    public void testCase01() throws APIException {

        TrafficLineParamBean trafficLineParamBean = new TrafficLineParamBean();
        TrafficLineResultBean returnValue = new TrafficLineResultBean();
        // 设置请求参数
        trafficLineParamBean.setStartCityId("");
        trafficLineParamBean.setStartStationId("646000001");
        trafficLineParamBean.setArriveCityId("");
        trafficLineParamBean.setArriveStationId("CQ2");
        trafficLineParamBean.setLeaveDate("2016-03-16");
        trafficLineParamBean.setGroup("");
        trafficLineParamBean.setParam2("");
        trafficLineParamBean.setParam3("");

        returnValue = trafficLineAPI.queryTrafficLine(trafficLineParamBean);
        System.out.println(returnValue);
    }
}
